import java.util.Scanner;

public class CalculatorTest {
    public static void main(String[] args) {
        Calculator c = new Calculator();
        c.color = "黑色";
        c.brand = "大众";
        c.price = 100;
        c.show();
        Scanner input = new Scanner(System.in);

        while (true) {
            System.out.println("请输入第一个整数");
            int a = input.nextInt();
            if (a==0) {
                System.out.println("退出程序");
               break;
            } else {
                System.out.println("请输入要进行的运算：+，-，*，/,lifang");
                String s = input.next();
                System.out.println("请输入第二个整数");
                int b = input.nextInt();
                if (s.equals("+")) {
                    System.out.println(c.addition(a, b));

                } else if (s.equals("-")) {
                    System.out.println(c.subtract(a, b));

                } else if (s.equals("*")) {
                    System.out.println(c.multipiy(a, b));

                } else if (s.equals("/")) {
                    System.out.println(c.divide(a, b));

                } else if (s.equals("lifang")) {
                    System.out.println(c.lifang(a));


                }
            }
        }
    }
}